Skip to content

Normalize openapi plugin secret/connection refs#519

Closed
RhysSullivan wants to merge 1 commit intors/normalize-graphqlfrom
rs/normalize-openapi
Closed

Normalize openapi plugin secret/connection refs#519
RhysSullivan wants to merge 1 commit intors/normalize-graphqlfrom
rs/normalize-openapi

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

Move secret/connection references out of the JSON columns on
openapi_source and openapi_source_binding into:

  • openapi_source_binding gains kind/secret_id/connection_id/text_value
    columns (replacing the discriminated-union json value)
  • openapi_source_query_param: child table for query_params, mirrors
    graphql_source_query_param shape
  • openapi_source_spec_fetch_header / spec_fetch_query_param: child
    tables for invocation_config.specFetchCredentials.{headers,queryParams}

Drops openapi_source.query_params and openapi_source.invocation_config
JSON columns. headers and oauth2 stay JSON because they hold slot
names rather than direct refs — the slots resolve through bindings,
which ARE normalized.

Plugin gains usagesForSecret / usagesForConnection that fan out across
all four locations in one indexed SELECT each. secrets.remove now
correctly RESTRICTs when an openapi binding still uses the secret.

Migration 0008 backfills via json_extract / json_each, then drops the
old columns. Three migration tests cover the backfill from a
hand-seeded pre-migration DB; two plugin-level tests cover usage
fan-out and remove RESTRICT.

Copy link
Copy Markdown
Owner Author

RhysSullivan commented May 4, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 4, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 22e0bb7 Commit Preview URL

Branch Preview URL
May 05 2026, 06:27 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 4, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 22e0bb7 May 05 2026, 06:28 PM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 4, 2026

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@519

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@519

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@519

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@519

@executor-js/storage-core

npm i https://pkg.pr.new/@executor-js/storage-core@519

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@519

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@519

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@519

@executor-js/plugin-google-discovery

npm i https://pkg.pr.new/@executor-js/plugin-google-discovery@519

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@519

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@519

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@519

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@519

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@519

executor

npm i https://pkg.pr.new/executor@519

commit: 22e0bb7

@RhysSullivan RhysSullivan force-pushed the rs/normalize-graphql branch from fc4e787 to 8df7c7b Compare May 4, 2026 19:50
@RhysSullivan RhysSullivan force-pushed the rs/normalize-openapi branch 2 times, most recently from 5a7fa76 to 8d1c6eb Compare May 5, 2026 18:10
@RhysSullivan RhysSullivan force-pushed the rs/normalize-graphql branch from 8df7c7b to 2e41ee2 Compare May 5, 2026 18:10
Move secret/connection references out of the JSON columns on
openapi_source and openapi_source_binding into:
- openapi_source_binding gains kind/secret_id/connection_id/text_value
  columns (replacing the discriminated-union json value)
- openapi_source_query_param: child table for query_params, mirrors
  graphql_source_query_param shape
- openapi_source_spec_fetch_header / spec_fetch_query_param: child
  tables for invocation_config.specFetchCredentials.{headers,queryParams}

Drops openapi_source.query_params and openapi_source.invocation_config
JSON columns. headers and oauth2 stay JSON because they hold slot
names rather than direct refs — the slots resolve through bindings,
which ARE normalized.

Plugin gains usagesForSecret / usagesForConnection that fan out across
all four locations in one indexed SELECT each. secrets.remove now
correctly RESTRICTs when an openapi binding still uses the secret.

Migration 0008 backfills via json_extract / json_each, then drops the
old columns. Three migration tests cover the backfill from a
hand-seeded pre-migration DB; two plugin-level tests cover usage
fan-out and remove RESTRICT.
@RhysSullivan RhysSullivan force-pushed the rs/normalize-graphql branch from 2e41ee2 to 57a1a41 Compare May 5, 2026 18:25
@RhysSullivan RhysSullivan force-pushed the rs/normalize-openapi branch from 8d1c6eb to 22e0bb7 Compare May 5, 2026 18:25
@RhysSullivan RhysSullivan marked this pull request as ready for review May 5, 2026 18:32
@RhysSullivan
Copy link
Copy Markdown
Owner Author

Consolidated into #521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant